#pragma once
/***********************************************************************************************
COPYRIGHT 2011 Mafahir Fairoze

This file is part of Neural++.
(Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)

Neural++ is a free software. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Neural++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License <http://www.gnu.org/licenses/> for more details.

***********************************************************************************************/

#include "INeuron.h"
#include "Connector.h"


namespace NeuralPlusPlus
	{
	namespace Core        
		{
		class INeuron;
		class Connector;

		/// <summary>
		/// This interface represents a synapse in a network. A Synapse is responsible for communication
		/// between neurons. A typical neural network consists of millions of synapses. The functioning
		/// of a neural network significantly depends on the <c>Weight</c>s of these synpases.
		/// </summary>
		class ISynapse abstract
			{
			public: double Weight;
			public: INeuron *SourceNeuron;
			public: INeuron *TargetNeuron;
			public: Connector *Parent;
			public: void virtual Propagate() = 0;

			public: void virtual OptimizeWeight(double learningFactor) = 0;

			public: void virtual Jitter(double jitterNoiseLimit) = 0;
			};
		}    
	}